<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Freetype OpenGL: Text buffer</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="style.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="content"><!-- do not remove this div! -->

<div id="top"><!-- do not remove this div! -->

  
  <div id="titlearea">
    
    <div id="projectname">Freetype OpenGL</div>
    
    
    <div id="projectbrief">A high quality OpenGL text rendering engine for C</div>
    
  </div>
  

<!--

<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Freetype OpenGL
   &#160;<span id="projectnumber">0.1</span>
   </div>
   <div id="projectbrief">A high quality OpenGL text rendering engine for C</div>
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>
-->


<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript" src="dynsections.js"></script>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Text buffer</div>  </div>
</div><!--header-->
<div class="contents">
<hr/><a name="details" id="details"></a><h2>Synopsis</h2>
<p><b>Example Usage</b>: </p>
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include &quot;<a class="code" href="shader_8h.html">shader.h</a>&quot;</span>

 <span class="keywordtype">int</span> main( <span class="keywordtype">int</span> arrgc, <span class="keywordtype">char</span> *argv[] )
 {

     <span class="keywordflow">return</span> 0;
 }
</pre></div> <table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structtext__buffer__t.html">text_buffer_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Text buffer structure.  <a href="structtext__buffer__t.html#details">More...</a><br/></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structglyph__vertex__t.html">glyph_vertex_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Glyph vertex structure.  <a href="structglyph__vertex__t.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad40995db39664d6d3f9da68d386a99da"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structtext__buffer__t.html">text_buffer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__text-buffer.html#gad40995db39664d6d3f9da68d386a99da">text_buffer_new</a> (size_t depth)</td></tr>
<tr class="memdesc:gad40995db39664d6d3f9da68d386a99da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new empty text buffer.  <a href="#gad40995db39664d6d3f9da68d386a99da"></a><br/></td></tr>
<tr class="memitem:gadbcccef4916637e046f5b342f195d635"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__text-buffer.html#gadbcccef4916637e046f5b342f195d635">text_buffer_render</a> (<a class="el" href="structtext__buffer__t.html">text_buffer_t</a> *self)</td></tr>
<tr class="memdesc:gadbcccef4916637e046f5b342f195d635"><td class="mdescLeft">&#160;</td><td class="mdescRight">Render a text buffer.  <a href="#gadbcccef4916637e046f5b342f195d635"></a><br/></td></tr>
<tr class="memitem:gabedbb9b1ad170e17545d2144bca1cca1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__text-buffer.html#gabedbb9b1ad170e17545d2144bca1cca1">text_buffer_printf</a> (<a class="el" href="structtext__buffer__t.html">text_buffer_t</a> *self, <a class="el" href="unionvec2.html">vec2</a> *pen,...)</td></tr>
<tr class="memdesc:gabedbb9b1ad170e17545d2144bca1cca1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print some text to the text buffer.  <a href="#gabedbb9b1ad170e17545d2144bca1cca1"></a><br/></td></tr>
<tr class="memitem:ga7d8bb02091e52fb172209510fef2f036"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__text-buffer.html#ga7d8bb02091e52fb172209510fef2f036">text_buffer_add_text</a> (<a class="el" href="structtext__buffer__t.html">text_buffer_t</a> *self, <a class="el" href="unionvec2.html">vec2</a> *pen, <a class="el" href="structmarkup__t.html">markup_t</a> *markup, wchar_t *text, size_t length)</td></tr>
<tr class="memdesc:ga7d8bb02091e52fb172209510fef2f036"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add some text to the text buffer.  <a href="#ga7d8bb02091e52fb172209510fef2f036"></a><br/></td></tr>
<tr class="memitem:ga625e357eb097ca5f1e775b6157ccefea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__text-buffer.html#ga625e357eb097ca5f1e775b6157ccefea">text_buffer_add_wchar</a> (<a class="el" href="structtext__buffer__t.html">text_buffer_t</a> *self, <a class="el" href="unionvec2.html">vec2</a> *pen, <a class="el" href="structmarkup__t.html">markup_t</a> *markup, wchar_t current, wchar_t previous)</td></tr>
<tr class="memdesc:ga625e357eb097ca5f1e775b6157ccefea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a char to the text buffer.  <a href="#ga625e357eb097ca5f1e775b6157ccefea"></a><br/></td></tr>
<tr class="memitem:ga69afa8b4e27b15fe420a529b5a9bec53"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__text-buffer.html#ga69afa8b4e27b15fe420a529b5a9bec53">text_buffer_clear</a> (<a class="el" href="structtext__buffer__t.html">text_buffer_t</a> *self)</td></tr>
<tr class="memdesc:ga69afa8b4e27b15fe420a529b5a9bec53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear text buffer.  <a href="#ga69afa8b4e27b15fe420a529b5a9bec53"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga7d8bb02091e52fb172209510fef2f036"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__text-buffer.html#ga7d8bb02091e52fb172209510fef2f036">text_buffer_add_text</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structtext__buffer__t.html">text_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="unionvec2.html">vec2</a> *&#160;</td>
          <td class="paramname"><em>pen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structmarkup__t.html">markup_t</a> *&#160;</td>
          <td class="paramname"><em>markup</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wchar_t *&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add some text to the text buffer. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>a text buffer </td></tr>
    <tr><td class="paramname">pen</td><td>position of text start </td></tr>
    <tr><td class="paramname">markup</td><td>Markup to be used to add text </td></tr>
    <tr><td class="paramname">text</td><td>Text to be added </td></tr>
    <tr><td class="paramname">length</td><td>Length of text to be added </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="demo-ansi_8c-example.html#a20">demo-ansi.c</a>, <a class="el" href="demo-gamma_8c-example.html#a13">demo-gamma.c</a>, and <a class="el" href="demo-subpixel_8c-example.html#a12">demo-subpixel.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga625e357eb097ca5f1e775b6157ccefea"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__text-buffer.html#ga625e357eb097ca5f1e775b6157ccefea">text_buffer_add_wchar</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structtext__buffer__t.html">text_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="unionvec2.html">vec2</a> *&#160;</td>
          <td class="paramname"><em>pen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structmarkup__t.html">markup_t</a> *&#160;</td>
          <td class="paramname"><em>markup</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wchar_t&#160;</td>
          <td class="paramname"><em>current</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wchar_t&#160;</td>
          <td class="paramname"><em>previous</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a char to the text buffer. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>a text buffer </td></tr>
    <tr><td class="paramname">pen</td><td>position of text start </td></tr>
    <tr><td class="paramname">markup</td><td>markup to be used to add text </td></tr>
    <tr><td class="paramname">current</td><td>charactr to be added </td></tr>
    <tr><td class="paramname">previous</td><td>previous character (if any) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga69afa8b4e27b15fe420a529b5a9bec53"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__text-buffer.html#ga69afa8b4e27b15fe420a529b5a9bec53">text_buffer_clear</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structtext__buffer__t.html">text_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Clear text buffer. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>a text buffer </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gad40995db39664d6d3f9da68d386a99da"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structtext__buffer__t.html">text_buffer_t</a>* <a class="el" href="group__text-buffer.html#gad40995db39664d6d3f9da68d386a99da">text_buffer_new</a> </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>depth</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new empty text buffer. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">depth</td><td>Underlying atlas bit depth (1 or 3)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>a new empty text buffer. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="demo-ansi_8c-example.html#a21">demo-ansi.c</a>, <a class="el" href="demo-gamma_8c-example.html#a6">demo-gamma.c</a>, <a class="el" href="demo-markup_8c-example.html#a2">demo-markup.c</a>, and <a class="el" href="demo-subpixel_8c-example.html#a6">demo-subpixel.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="gabedbb9b1ad170e17545d2144bca1cca1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__text-buffer.html#gabedbb9b1ad170e17545d2144bca1cca1">text_buffer_printf</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structtext__buffer__t.html">text_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="unionvec2.html">vec2</a> *&#160;</td>
          <td class="paramname"><em>pen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Print some text to the text buffer. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>a text buffer </td></tr>
    <tr><td class="paramname">pen</td><td>position of text start </td></tr>
    <tr><td class="paramname">...</td><td>a series of <a class="el" href="structmarkup__t.html" title="Simple structure that describes text properties.">markup_t</a> *, wchar_t * ended by NULL </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="demo-markup_8c-example.html#a16">demo-markup.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="gadbcccef4916637e046f5b342f195d635"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__text-buffer.html#gadbcccef4916637e046f5b342f195d635">text_buffer_render</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structtext__buffer__t.html">text_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Render a text buffer. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>a text buffer </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="demo-ansi_8c-example.html#a1">demo-ansi.c</a>, <a class="el" href="demo-gamma_8c-example.html#a3">demo-gamma.c</a>, <a class="el" href="demo-markup_8c-example.html#a1">demo-markup.c</a>, and <a class="el" href="demo-subpixel_8c-example.html#a3">demo-subpixel.c</a>.</dd>
</dl>
</div>
</div>
</div><!-- contents -->
</div>
</body>
</html>
